package net.yondervision.hrfsp.sdk.esign.domain.request;

import cn.hutool.http.Method;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.yondervision.hrfsp.sdk.esign.domain.AbstractESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.ESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.request.path.IdentityAuthPubOrganizationSubbranchParamPath;
import net.yondervision.hrfsp.sdk.esign.domain.request.query.IdentityAuthPubOrganizationSubbranchParamQuery;
import net.yondervision.hrfsp.sdk.esign.domain.response.IdentityAuthPubOrganizationSubbranchResponse;

/**
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/10/08 13:37
 */
@Data
@Builder
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class IdentityAuthPubOrganizationSubbranchRequest extends
    AbstractESignRequest implements
    ESignRequest<IdentityAuthPubOrganizationSubbranchResponse> {

  private IdentityAuthPubOrganizationSubbranchParamPath identityAuthPubOrganizationSubbranchParamPath;
  private IdentityAuthPubOrganizationSubbranchParamQuery identityAuthPubOrganizationSubbranchParamQuery;

  public IdentityAuthPubOrganizationSubbranchRequest(
      IdentityAuthPubOrganizationSubbranchParamPath identityAuthPubOrganizationSubbranchParamPath,
      IdentityAuthPubOrganizationSubbranchParamQuery identityAuthPubOrganizationSubbranchParamQuery) {
    this.identityAuthPubOrganizationSubbranchParamPath = identityAuthPubOrganizationSubbranchParamPath;
    this.identityAuthPubOrganizationSubbranchParamQuery = identityAuthPubOrganizationSubbranchParamQuery;
    this.setParamPath(identityAuthPubOrganizationSubbranchParamPath);
    this.setParamQuery(identityAuthPubOrganizationSubbranchParamQuery);
  }

  @Override
  public String getVersion() {
    return "v2";
  }

  @Override
  public String getUrl() {
    return "/identity/auth/pub/organization/{flowId}/subbranch";
  }

  @Override
  public Method getMethodType() {
    return Method.GET;
  }

  @Override
  public Class<IdentityAuthPubOrganizationSubbranchResponse> getResponseClass() {
    return IdentityAuthPubOrganizationSubbranchResponse.class;
  }
}
